﻿{% extends "base.html" %}



{% block css %}
<link rel="stylesheet" href="/static/css/admin.css">

{% endblock %}


{% block center %}


<!--头部导航-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-body">
    <ol class="breadcrumb" style="margin-bottom: 0px;background-color: #FFFFFF;">
      <li><a href="/" style="color: #377CD8;">首页</a></li>
      <li><a href="javascript:;">资产信息</a></li>
      <li class="active">{{ title }}</li>
    </ol>
  </div>
</div>



<!--用户信息-->
<div class="panel panel-default center-top" style="min-width:1300px;">
  <div class="panel-heading">
      <div class="row" style="padding-left:10px;">
          <div class="col-sm-2">
              <h5 style="color:green">服务器：{{ host_info.IP }} 详细信息</h5>

          </div>
          <div class="col-sm-1 pull-right">
              <a  href="/cmdb/hostinfo/page_id=1/" class="btn btn-success"> 返回</a>

          </div>

      </div>
  </div>
  <div class="panel-body" id="host-info" style="max-height:685px;overflow:auto">

        <div class="panel panel-primary center-top" style="min-width:1250px;">
          <div class="panel-heading">
              <div class="row" style="padding-left:10px;">
                  <div class="col-sm-3">
                      <h5>基本信息</h5>
                  </div>

              </div>
          </div>
          <div class="panel-body" >
              <div class="row">
                  <div class="col-sm-3">
                      <span>主机IP地址：{{ host_info.IP }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>内网地址：{{ host_info.in_ip }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span> 主机名：{{host_info.hostname }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span> 描述：{{host_info.msg }}</span>

                  </div>
              </div>
              <hr>

              <div class="row">
                  <div class="col-sm-3">
                      <span>管理用户：{{ host_info.username }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>管理密码：{{ host_info.passwd }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>远程端口：{{ host_info.port }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span> 设备类型：{{host_info.device_type }}</span>
                  </div>
              </div>
              <hr>


              <div class="row">

                  <div class="col-sm-3">
                      <span>主机组：{{ host_info.host_group.group_name }}</span>
                  </div>

                  <div class="col-sm-3">
                      <span> 机房：{{ host_info.idc.idc_name }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>开机状态：{{host_info.status }}</span>
                  </div>

                  <div class="col-sm-3">
                      <span> 添加时间：{{ host_info.addTime |date:"Y-m-d H:i:s" }}</span>
                  </div>

              </div>


          </div>
        </div>


        <div class="panel panel-primary center-top" style="min-width:1250px;">
          <div class="panel-heading">
              <div class="row" style="padding-left:10px;">
                  <div class="col-sm-3">
                      <h5>系统信息</h5>
                  </div>

              </div>
          </div>
          <div class="panel-body" >


              <div class="row">


                  <div class="col-sm-3">
                      <span>系统类型：{{host_info.os_type }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>系统版本：{{ host_info.os_version }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>内核版本：{{ host_info.kernel }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>系统类别：{{ host_info.service_type }}</span>
                  </div>
              </div>
              <hr>

              <div class="row">
                  <div class="col-sm-3">
                      <span>CPU型号：{{ host_info.cpu_type }}</span>
                  </div>
                  <div class="col-sm-3">
                      <span>CPU核数：{{ host_info.cpu_num }}</span>
                  </div>

                  <div class="col-sm-3">
                      <span> 物理内存：{{host_info.mem_total }} MB</span>
                  </div>
                  <div class="col-sm-3">
                      <span> 虚拟内存（swap）：{{ host_info.mem_swap }} MB</span>
                  </div>

              </div>
              <hr>


              <div class="row">

                    {% for disk in disk_info %}

                  <div class="col-sm-3">
                      <span>{{ disk }}</span>
                  </div>
                  {% endfor %}
              </div>


          </div>
        </div>

        <div class="panel panel-primary center-top" style="min-width:1250px;">
          <div class="panel-heading">
              <div class="row" style="padding-left:10px;">
                  <div class="col-sm-3">
                      <h5>软件服务</h5>
                  </div>

              </div>
          </div>
          <div class="panel-body" >
              <table class="table table-hover table-bordered">
                  <thead>
                    <tr style="background-color: #f5f5f5;">

                      <th>服务名称</th>
                      <th>版本</th>
                      <th>运行端口</th>
                    </tr>
                  </thead>
                  <tbody>

                  {% for i in software_list %}
                    <tr>

                      <td>{{ i.server_name }}</td>
                      <td>{{ i.server_version }}</td>
                      <td>{{ i.server_port }}</td>
                    </tr>
                  {% endfor %}
                  </tbody>
                </table>

          </div>
        </div>

  </div>
</div>


{% endblock %}




{% block js %}

<script type="text/javascript" src="/static/js/cmdb.js"></script>


<script type='text/javascript'>

    $(function () {
      $('[data-toggle="tooltip"]').tooltip()
    })


</script>

{% endblock %}



